import { defineStore } from "pinia";
import type { FileUploadStoreState } from "../types/fileUploadCompleteTypes";

const useFileUploadComplete = defineStore("fileUploadComplete", {
  state: (): FileUploadStoreState => ({
    loadingArr: {},
    completeState: {}
  }),
  actions: {
    setFileLoading(uid: string, progress: number) {
      this.loadingArr[uid] = progress;
    },
    setCompleteState(uid: string, state: boolean) {
      this.completeState[uid] = state;
    }
  }
});
export default useFileUploadComplete;
